<template>
    <div class="skeleton-wrap">
        <van-skeleton>
            <template #template>
                <div class="skeleton-box">
                    <van-skeleton-image class="image" :style="'width: '+ width +';height: '+ height +';'"/>
                    <div class="text">
                        <van-skeleton-paragraph row-width="100%" style="height: 13px;" />
                    </div>
                </div>
            </template>
        </van-skeleton>
    </div>
</template>

<script lang="ts" setup>
withDefaults(defineProps<{
    width?: string
    height?: string
}>(), {
    width: '60px',
    height: '60px'
})
</script>

<style scoped lang="scss">
::v-deep(.van-skeleton) {
    padding: 0px 0px;
}
.skeleton-wrap {
    .skeleton-box {
        display: flex;
        flex-direction: column;
        // align-items: center;
        justify-content: center;
        width: 60px;
        height: 80px;
        margin-bottom: 10px;
        margin-right: 20px;
        .image {
            border-radius: 5px;
        }
        .text {
            padding-top: 4px;
        }
    }
}
</style>